Micron Document
NexusPi Git Node

Node / mirrors / RTNode-HeltecV4 / files / lib / microReticulum / src / Destination.h

Displaying Raw • Download

lib/microReticulum/src/Destination.h 20ec0b4ee3f3e7a8b3c8d00dcdcd5afdcf2bc840 (20ec0b4e) Text, 10.79 KB

Tff7b72#Tff7b72pragma once

T8b949e//#include "Reticulum.h"
T8b949e//#include "Link.h"
T8b949e//#include "Interface.h"
Tff7b72#Tff7b72include T8b949e"Identity.h"
Tff7b72#Tff7b72include T8b949e"Bytes.h"
Tff7b72#Tff7b72include T8b949e"Type.h"

Tff7b72#Tff7b72include T8b949e<memory>
Tff7b72#Tff7b72include T8b949e<string>
Tff7b72#Tff7b72include T8b949e<utility>
Tff7b72#Tff7b72include T8b949e<vector>
Tff7b72#Tff7b72include T8b949e<map>
Tff7b72#Tff7b72include T8b949e<set>
Tff7b72#Tff7b72include T8b949e<cassert>
Tff7b72#Tff7b72include T8b949e<stdint.h>

Te6edf3namespace Te6edf3RNS Tb4b4b4{

Te6edf3class Te6edf3InterfaceTb4b4b4;
Te6edf3class Te6edf3LinkTb4b4b4;
Te6edf3class Te6edf3PacketTb4b4b4;

Te6edf3class Te6edf3RequestHandler Tb4b4b4{
Te6edf3publicTff7b72:
Te6edf3using Te6edf3response_generator Tff7b72= Te6edf3BytesTb4b4b4(Tff7b72*Tb4b4b4)Tb4b4b4(Tff7b72const Te6edf3BytesTff7b72& Te6edf3pathTb4b4b4, Tff7b72const Te6edf3BytesTff7b72& Te6edf3dataTb4b4b4, Tff7b72const Te6edf3BytesTff7b72& Te6edf3request_idTb4b4b4, Tff7b72const Te6edf3BytesTff7b72& Te6edf3link_idTb4b4b4, Tff7b72const Te6edf3IdentityTff7b72& Te6edf3remote_identityTb4b4b4, Tffa657double Te6edf3requested_atTb4b4b4)Tb4b4b4;
Te6edf3publicTff7b72:
Te6edf3RequestHandlerTb4b4b4(Tff7b72const Te6edf3RequestHandlerTff7b72& Te6edf3handlerTb4b4b4) Tb4b4b4{
Te6edf3_path Tff7b72= Te6edf3handlerTb4b4b4.Te6edf3_pathTb4b4b4;
Te6edf3_response_generator Tff7b72= Te6edf3handlerTb4b4b4.Te6edf3_response_generatorTb4b4b4;
Te6edf3_allow Tff7b72= Te6edf3handlerTb4b4b4.Te6edf3_allowTb4b4b4;
Te6edf3_allowed_list Tff7b72= Te6edf3handlerTb4b4b4.Te6edf3_allowed_listTb4b4b4;
Tb4b4b4}
Te6edf3Bytes Te6edf3_pathTb4b4b4;
Te6edf3response_generator Te6edf3_response_generator Tff7b72= Tffa657nullptrTb4b4b4;
Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3request_policies Te6edf3_allow Tff7b72= Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3ALLOW_NONETb4b4b4;
Te6edf3stdTff7b72:Tff7b72:Te6edf3setTff7b72<Te6edf3BytesTff7b72> Te6edf3_allowed_listTb4b4b4;
Tb4b4b4}Tb4b4b4;

T8b949e/**
* @brief A class used to describe endpoints in a Reticulum Network. Destination
* instances are used both to create outgoing and incoming endpoints. The
* destination type will decide if encryption, and what type, is used in
* communication with the endpoint. A destination can also announce its
* presence on the network, which will also distribute necessary keys for
* encrypted communication with it.
*
* @param identity An instance of :ref:`RNS.Identity<api-identity>`. Can hold only public keys for an outgoing destination, or holding private keys for an ingoing.
* @param direction ``RNS.Destination.IN`` or ``RNS.Destination.OUT``.
* @param type ``RNS.Destination.SINGLE``, ``RNS.Destination.GROUP`` or ``RNS.Destination.PLAIN``.
* @param app_name A string specifying the app name.
* @param aspects Any non-zero number of string arguments.
*/
Te6edf3class Te6edf3Destination Tb4b4b4{

Te6edf3publicTff7b72:
Te6edf3class Te6edf3Callbacks Tb4b4b4{
Te6edf3publicTff7b72:
Te6edf3using Te6edf3link_established Tff7b72= Tffa657voidTb4b4b4(Tff7b72*Tb4b4b4)Tb4b4b4(Te6edf3LinkTff7b72& Te6edf3linkTb4b4b4)Tb4b4b4;
T8b949e//using packet = void(*)(uint8_t* data, uint16_t data_len, Packet *packet);
Te6edf3using Te6edf3packet Tff7b72= Tffa657voidTb4b4b4(Tff7b72*Tb4b4b4)Tb4b4b4(Tff7b72const Te6edf3BytesTff7b72& Te6edf3dataTb4b4b4, Tff7b72const Te6edf3PacketTff7b72& Te6edf3packetTb4b4b4)Tb4b4b4;
Te6edf3using Te6edf3proof_requested Tff7b72= Tffa657boolTb4b4b4(Tff7b72*Tb4b4b4)Tb4b4b4(Tff7b72const Te6edf3PacketTff7b72& Te6edf3packetTb4b4b4)Tb4b4b4;
Te6edf3publicTff7b72:
Te6edf3link_established Te6edf3_link_established Tff7b72= Tffa657nullptrTb4b4b4;
Te6edf3packet Te6edf3_packet Tff7b72= Tffa657nullptrTb4b4b4;
Te6edf3proof_requested Te6edf3_proof_requested Tff7b72= Tffa657nullptrTb4b4b4;
Te6edf3friend Te6edf3class Te6edf3DestinationTb4b4b4;
Tb4b4b4}Tb4b4b4;

Te6edf3using Te6edf3PathResponse Tff7b72= Te6edf3stdTff7b72:Tff7b72:Te6edf3pairTff7b72<Tffa657doubleTb4b4b4, Te6edf3BytesTff7b72>Tb4b4b4;

Te6edf3publicTff7b72:
Te6edf3DestinationTb4b4b4(Te6edf3TypeTff7b72:Tff7b72:Te6edf3NoneConstructor Te6edf3noneTb4b4b4) Tb4b4b4{
Te6edf3MEMTb4b4b4(Ta5d6ff"Ta5d6ffDestination NONE object created, this: Ta5d6ff" Tff7b72+ Te6edf3stdTff7b72:Tff7b72:Te6edf3to_stringTb4b4b4(Tb4b4b4(Tffa657uintptr_tTb4b4b4)Te6edf3thisTb4b4b4)Tb4b4b4)Tb4b4b4;
Tb4b4b4}
Te6edf3DestinationTb4b4b4(Tff7b72const Te6edf3DestinationTff7b72& Te6edf3destinationTb4b4b4) Tff7b72: Te6edf3_objectTb4b4b4(Te6edf3destinationTb4b4b4.Te6edf3_objectTb4b4b4) Tb4b4b4{
Te6edf3MEMTb4b4b4(Ta5d6ff"Ta5d6ffDestination object copy created, this: Ta5d6ff" Tff7b72+ Te6edf3stdTff7b72:Tff7b72:Te6edf3to_stringTb4b4b4(Tb4b4b4(Tffa657uintptr_tTb4b4b4)Te6edf3thisTb4b4b4) Tff7b72+ Ta5d6ff"Ta5d6ff, data: Ta5d6ff" Tff7b72+ Te6edf3stdTff7b72:Tff7b72:Te6edf3to_stringTb4b4b4(Tb4b4b4(Tffa657uintptr_tTb4b4b4)Te6edf3_objectTb4b4b4.Te6edf3getTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4)Tb4b4b4;
Tb4b4b4}
Te6edf3DestinationTb4b4b4(
Tff7b72const Te6edf3IdentityTff7b72& Te6edf3identityTb4b4b4,
Tff7b72const Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3directions Te6edf3directionTb4b4b4,
Tff7b72const Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3types Te6edf3typeTb4b4b4,
Tff7b72const Tffa657charTff7b72* Te6edf3app_nameTb4b4b4,
Tff7b72const Tffa657charTff7b72* Te6edf3aspects
Tb4b4b4)Tb4b4b4;
Te6edf3DestinationTb4b4b4(
Tff7b72const Te6edf3IdentityTff7b72& Te6edf3identityTb4b4b4,
Tff7b72const Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3directions Te6edf3directionTb4b4b4,
Tff7b72const Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3types Te6edf3typeTb4b4b4,
Tff7b72const Te6edf3BytesTff7b72& Te6edf3hash
Tb4b4b4)Tb4b4b4;
Te6edf3virtual Tff7b72~Te6edf3DestinationTb4b4b4(Tb4b4b4)Tb4b4b4;

Tff7b72inline Te6edf3DestinationTff7b72& Te6edf3operator Tff7b72= Tb4b4b4(Tff7b72const Te6edf3DestinationTff7b72& Te6edf3destinationTb4b4b4) Tb4b4b4{
Te6edf3_object Tff7b72= Te6edf3destinationTb4b4b4.Te6edf3_objectTb4b4b4;
Te6edf3MEMTb4b4b4(Ta5d6ff"Ta5d6ffDestination object copy created by assignment, this: Ta5d6ff" Tff7b72+ Te6edf3stdTff7b72:Tff7b72:Te6edf3to_stringTb4b4b4(Tb4b4b4(Tffa657uintptr_tTb4b4b4)Te6edf3thisTb4b4b4) Tff7b72+ Ta5d6ff"Ta5d6ff, data: Ta5d6ff" Tff7b72+ Te6edf3stdTff7b72:Tff7b72:Te6edf3to_stringTb4b4b4(Tb4b4b4(Tffa657uintptr_tTb4b4b4)Te6edf3_objectTb4b4b4.Te6edf3getTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4)Tb4b4b4;
Tff7b72return Tff7b72*Te6edf3thisTb4b4b4;
Tb4b4b4}
Tff7b72inline Te6edf3operator Tffa657boolTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{
Tff7b72return Te6edf3_objectTb4b4b4.Te6edf3getTb4b4b4(Tb4b4b4) Tff7b72!Tff7b72= Tffa657nullptrTb4b4b4;
Tb4b4b4}
Tff7b72inline Tffa657bool Te6edf3operator Tff7b72< Tb4b4b4(Tff7b72const Te6edf3DestinationTff7b72& Te6edf3destinationTb4b4b4) Tff7b72const Tb4b4b4{
Tff7b72return Te6edf3_objectTb4b4b4.Te6edf3getTb4b4b4(Tb4b4b4) Tff7b72< Te6edf3destinationTb4b4b4.Te6edf3_objectTb4b4b4.Te6edf3getTb4b4b4(Tb4b4b4)Tb4b4b4;
Tb4b4b4}

Te6edf3publicTff7b72:
Tff7b72static Te6edf3stdTff7b72:Tff7b72:Te6edf3string Te6edf3expand_nameTb4b4b4(Tff7b72const Te6edf3IdentityTff7b72& Te6edf3identityTb4b4b4, Tff7b72const Tffa657charTff7b72* Te6edf3app_nameTb4b4b4, Tff7b72const Tffa657charTff7b72* Te6edf3aspectsTb4b4b4)Tb4b4b4;
Tff7b72static Te6edf3Bytes Td2a8ffhashTb4b4b4(Tff7b72const Te6edf3IdentityTff7b72& Te6edf3identityTb4b4b4, Tff7b72const Tffa657charTff7b72* Te6edf3app_nameTb4b4b4, Tff7b72const Tffa657charTff7b72* Te6edf3aspectsTb4b4b4)Tb4b4b4;
Tff7b72static Te6edf3Bytes Td2a8ffname_hashTb4b4b4(Tff7b72const Tffa657charTff7b72* Te6edf3app_nameTb4b4b4, Tff7b72const Tffa657charTff7b72* Te6edf3aspectsTb4b4b4)Tb4b4b4;
Tff7b72static Te6edf3stdTff7b72:Tff7b72:Te6edf3vectorTff7b72<Te6edf3stdTff7b72:Tff7b72:Te6edf3stringTff7b72> Te6edf3app_and_aspects_from_nameTb4b4b4(Tff7b72const Tffa657charTff7b72* Te6edf3full_nameTb4b4b4)Tb4b4b4;
Tff7b72static Te6edf3Bytes Td2a8ffhash_from_name_and_identityTb4b4b4(Tff7b72const Tffa657charTff7b72* Te6edf3full_nameTb4b4b4, Tff7b72const Te6edf3IdentityTff7b72& Te6edf3identityTb4b4b4)Tb4b4b4;

Te6edf3publicTff7b72:
T8b949e//Packet announce(const Bytes& app_data = {}, bool path_response = false, const Interface& attached_interface = {Type::NONE}, const Bytes& tag = {}, bool send = true);
Te6edf3Packet Te6edf3announceTb4b4b4(Tff7b72const Te6edf3BytesTff7b72& Te6edf3app_dataTb4b4b4, Tffa657bool Te6edf3path_responseTb4b4b4, Tff7b72const Te6edf3InterfaceTff7b72& Te6edf3attached_interfaceTb4b4b4, Tff7b72const Te6edf3BytesTff7b72& Te6edf3tag Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4, Tffa657bool Te6edf3send Tff7b72= Tffa657trueTb4b4b4)Tb4b4b4;
Te6edf3Packet Td2a8ffannounceTb4b4b4(Tff7b72const Te6edf3BytesTff7b72& Te6edf3app_data Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4, Tffa657bool Te6edf3path_response Tff7b72= Tffa657falseTb4b4b4)Tb4b4b4;

T8b949e/*
Set or query whether the destination accepts incoming link requests.

:param accepts: If ``True`` or ``False``, this method sets whether the destination accepts incoming link requests. If not provided or ``None``, the method returns whether the destination currently accepts link requests.
:returns: ``True`` or ``False`` depending on whether the destination accepts incoming link requests, if the *accepts* parameter is not provided or ``None``.
*/
Tff7b72inline Tffa657void Td2a8ffaccepts_linksTb4b4b4(Tffa657bool Te6edf3acceptsTb4b4b4) Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Te6edf3_objectTff7b72-Tff7b72>Te6edf3_accept_link_requests Tff7b72= Te6edf3acceptsTb4b4b4; Tb4b4b4}
Tff7b72inline Tffa657bool Td2a8ffaccepts_linksTb4b4b4(Tb4b4b4) Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_accept_link_requestsTb4b4b4; Tb4b4b4}

T8b949e/*
Registers a function to be called when a link has been established to
this destination.

:param callback: A function or method with the signature *callback(link)* to be called when a new link is established with this destination.
*/
Tff7b72inline Tffa657void Td2a8ffset_link_established_callbackTb4b4b4(Te6edf3CallbacksTff7b72:Tff7b72:Te6edf3link_established Te6edf3callbackTb4b4b4) Tb4b4b4{
Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4;
Te6edf3_objectTff7b72-Tff7b72>Te6edf3_callbacksTb4b4b4.Te6edf3_link_established Tff7b72= Te6edf3callbackTb4b4b4;
Tb4b4b4}
T8b949e/*
Registers a function to be called when a packet has been received by
this destination.

:param callback: A function or method with the signature *callback(data, packet)* to be called when this destination receives a packet.
*/
Tff7b72inline Tffa657void Td2a8ffset_packet_callbackTb4b4b4(Te6edf3CallbacksTff7b72:Tff7b72:Te6edf3packet Te6edf3callbackTb4b4b4) Tb4b4b4{
Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4;
Te6edf3_objectTff7b72-Tff7b72>Te6edf3_callbacksTb4b4b4.Te6edf3_packet Tff7b72= Te6edf3callbackTb4b4b4;
Tb4b4b4}
T8b949e/*
Registers a function to be called when a proof has been requested for
a packet sent to this destination. Allows control over when and if
proofs should be returned for received packets.

:param callback: A function or method to with the signature *callback(packet)* be called when a packet that requests a proof is received. The callback must return one of True or False. If the callback returns True, a proof will be sent. If it returns False, a proof will not be sent.
*/
Tff7b72inline Tffa657void Td2a8ffset_proof_requested_callbackTb4b4b4(Te6edf3CallbacksTff7b72:Tff7b72:Te6edf3proof_requested Te6edf3callbackTb4b4b4) Tb4b4b4{
Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4;
Te6edf3_objectTff7b72-Tff7b72>Te6edf3_callbacksTb4b4b4.Te6edf3_proof_requested Tff7b72= Te6edf3callbackTb4b4b4;
Tb4b4b4}

T8b949e/*
Sets the destinations proof strategy.

:param proof_strategy: One of ``RNS.Destination.PROVE_NONE``, ``RNS.Destination.PROVE_ALL`` or ``RNS.Destination.PROVE_APP``. If ``RNS.Destination.PROVE_APP`` is set, the `proof_requested_callback` will be called to determine whether a proof should be sent or not.
*/
Tff7b72inline Tffa657void Td2a8ffset_proof_strategyTb4b4b4(Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3proof_strategies Te6edf3proof_strategyTb4b4b4) Tb4b4b4{
Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4;
T8b949e//if (proof_strategy <= PROOF_NONE) {
T8b949e// throw throw std::invalid_argument("Unsupported proof strategy");
T8b949e//}
Te6edf3_objectTff7b72-Tff7b72>Te6edf3_proof_strategy Tff7b72= Te6edf3proof_strategyTb4b4b4;
Tb4b4b4}

Tffa657void Td2a8ffreceiveTb4b4b4(Tff7b72const Te6edf3PacketTff7b72& Te6edf3packetTb4b4b4)Tb4b4b4;
Tffa657void Td2a8ffincoming_link_requestTb4b4b4(Tff7b72const Te6edf3BytesTff7b72& Te6edf3dataTb4b4b4, Tff7b72const Te6edf3PacketTff7b72& Te6edf3packetTb4b4b4)Tb4b4b4;

Te6edf3virtual Tff7b72const Te6edf3Bytes Te6edf3encryptTb4b4b4(Tff7b72const Te6edf3BytesTff7b72& Te6edf3dataTb4b4b4)Tb4b4b4;
Te6edf3virtual Tff7b72const Te6edf3Bytes Te6edf3decryptTb4b4b4(Tff7b72const Te6edf3BytesTff7b72& Te6edf3dataTb4b4b4)Tb4b4b4;
Te6edf3virtual Tff7b72const Te6edf3Bytes Te6edf3signTb4b4b4(Tff7b72const Te6edf3BytesTff7b72& Te6edf3messageTb4b4b4)Tb4b4b4;

T8b949e// CBA
Tffa657bool Td2a8ffhas_linkTb4b4b4(Tff7b72const Te6edf3LinkTff7b72& Te6edf3linkTb4b4b4)Tb4b4b4;
Tffa657void Td2a8ffremove_linkTb4b4b4(Tff7b72const Te6edf3LinkTff7b72& Te6edf3linkTb4b4b4)Tb4b4b4;

Tff7b72inline Te6edf3stdTff7b72:Tff7b72:Te6edf3string Td2a8fftoStringTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Tff7b72if Tb4b4b4(Tff7b72!Te6edf3_objectTb4b4b4) Tff7b72return Ta5d6ff"Ta5d6ff"Tb4b4b4; Tff7b72return Ta5d6ff"Ta5d6ff{Destination:Ta5d6ff" Tff7b72+ Te6edf3_objectTff7b72-Tff7b72>Te6edf3_hashTb4b4b4.Te6edf3toHexTb4b4b4(Tb4b4b4) Tff7b72+ Ta5d6ff"Ta5d6ff}Ta5d6ff"Tb4b4b4; Tb4b4b4}

T8b949e// getters
Tff7b72inline Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3types Td2a8fftypeTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_typeTb4b4b4; Tb4b4b4}
Tff7b72inline Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3directions Td2a8ffdirectionTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_directionTb4b4b4; Tb4b4b4}
Tff7b72inline Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3proof_strategies Td2a8ffproof_strategyTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_proof_strategyTb4b4b4; Tb4b4b4}
Tff7b72inline Tff7b72const Te6edf3BytesTff7b72& Td2a8ffhashTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_hashTb4b4b4; Tb4b4b4}
Tff7b72inline Tffa657uint16_t Td2a8ffmtuTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_mtuTb4b4b4; Tb4b4b4}
T8b949e// CBA LINK
T8b949e//inline const Bytes& link_id() const { assert(_object); return _object->_link_id; }
T8b949e//inline Type::Link::status status() const { assert(_object); return _object->_status; }
Tff7b72inline Tff7b72const Te6edf3CallbacksTff7b72& Td2a8ffcallbacksTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_callbacksTb4b4b4; Tb4b4b4}
Tff7b72inline Tff7b72const Te6edf3IdentityTff7b72& Td2a8ffidentityTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_identityTb4b4b4; Tb4b4b4}
Tff7b72inline Tff7b72const Te6edf3stdTff7b72:Tff7b72:Te6edf3mapTff7b72<Te6edf3BytesTb4b4b4, Te6edf3PathResponseTff7b72>Tff7b72& Te6edf3path_responsesTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_path_responsesTb4b4b4; Tb4b4b4}
Tff7b72inline Tff7b72const Te6edf3stdTff7b72:Tff7b72:Te6edf3mapTff7b72<Te6edf3BytesTb4b4b4, Te6edf3RequestHandlerTff7b72>Tff7b72& Te6edf3request_handlersTb4b4b4(Tb4b4b4) Tff7b72const Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Tff7b72return Te6edf3_objectTff7b72-Tff7b72>Te6edf3_request_handlersTb4b4b4; Tb4b4b4}

T8b949e// setters
T8b949e// CBA Don't allow changing destination hash after construction since it's used as key in collections
T8b949e//inline void hash(const Bytes& hash) { assert(_object); _object->_hash = hash; _object->_hexhash = _object->_hash.toHex(); }
Tff7b72inline Tffa657void Te6edf3typeTb4b4b4(Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3types Te6edf3typeTb4b4b4) Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Te6edf3_objectTff7b72-Tff7b72>Te6edf3_type Tff7b72= Te6edf3typeTb4b4b4; Tb4b4b4}
Tff7b72inline Tffa657void Te6edf3mtuTb4b4b4(Tffa657uint16_t Te6edf3mtuTb4b4b4) Tb4b4b4{ Te6edf3assertTb4b4b4(Te6edf3_objectTb4b4b4)Tb4b4b4; Te6edf3_objectTff7b72-Tff7b72>Te6edf3_mtu Tff7b72= Te6edf3mtuTb4b4b4; Tb4b4b4}
T8b949e// CBA LINK
T8b949e//inline void link_id(const Bytes& id) { assert(_object); _object->_link_id = id; }
T8b949e//inline void last_outbound(double time) { assert(_object); _object->_last_outbound = time; }
T8b949e//inline void increment_tx() { assert(_object); ++_object->_tx; }
T8b949e//inline void increment_txbytes(uint16_t bytes) { assert(_object); _object->_txbytes += bytes; }

Te6edf3privateTff7b72:
Te6edf3class Te6edf3Object Tb4b4b4{
Te6edf3publicTff7b72:
Te6edf3ObjectTb4b4b4(Tff7b72const Te6edf3IdentityTff7b72& Te6edf3identityTb4b4b4) Tff7b72: Te6edf3_identityTb4b4b4(Te6edf3identityTb4b4b4) Tb4b4b4{ Te6edf3MEMTb4b4b4(Ta5d6ff"Ta5d6ffDestination::Data object created, this: Ta5d6ff" Tff7b72+ Te6edf3stdTff7b72:Tff7b72:Te6edf3to_stringTb4b4b4(Tb4b4b4(Tffa657uintptr_tTb4b4b4)Te6edf3thisTb4b4b4)Tb4b4b4)Tb4b4b4; Tb4b4b4}
Te6edf3virtual Tff7b72~Te6edf3ObjectTb4b4b4(Tb4b4b4) Tb4b4b4{ Te6edf3MEMTb4b4b4(Ta5d6ff"Ta5d6ffDestination::Data object destroyed, this: Ta5d6ff" Tff7b72+ Te6edf3stdTff7b72:Tff7b72:Te6edf3to_stringTb4b4b4(Tb4b4b4(Tffa657uintptr_tTb4b4b4)Te6edf3thisTb4b4b4)Tb4b4b4)Tb4b4b4; Tb4b4b4}
Te6edf3privateTff7b72:
Tffa657bool Te6edf3_accept_link_requests Tff7b72= Tffa657trueTb4b4b4;
Te6edf3Callbacks Te6edf3_callbacksTb4b4b4;
Te6edf3stdTff7b72:Tff7b72:Te6edf3mapTff7b72<Te6edf3BytesTb4b4b4, Te6edf3RequestHandlerTff7b72> Te6edf3_request_handlersTb4b4b4;
Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3types Te6edf3_typeTb4b4b4;
Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3directions Te6edf3_directionTb4b4b4;
Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3proof_strategies Te6edf3_proof_strategy Tff7b72= Te6edf3TypeTff7b72:Tff7b72:Te6edf3DestinationTff7b72:Tff7b72:Te6edf3PROVE_NONETb4b4b4;
Tffa657uint16_t Te6edf3_mtu Tff7b72= T79c0ff0Tb4b4b4;

Te6edf3stdTff7b72:Tff7b72:Te6edf3mapTff7b72<Te6edf3BytesTb4b4b4, Te6edf3PathResponseTff7b72> Te6edf3_path_responsesTb4b4b4;
Te6edf3stdTff7b72:Tff7b72:Te6edf3setTff7b72<Te6edf3LinkTff7b72> Te6edf3_linksTb4b4b4;

Te6edf3Identity Te6edf3_identityTb4b4b4;
Te6edf3stdTff7b72:Tff7b72:Te6edf3string Te6edf3_nameTb4b4b4;

T8b949e// Generate the destination address hash
Te6edf3Bytes Te6edf3_hashTb4b4b4;
Te6edf3Bytes Te6edf3_name_hashTb4b4b4;
Te6edf3stdTff7b72:Tff7b72:Te6edf3string Te6edf3_hexhashTb4b4b4;

T8b949e// CBA TODO when is _default_app_data a "callable"?
Te6edf3Bytes Te6edf3_default_app_dataTb4b4b4;

T8b949e// CBA LINK
T8b949e// CBA _link_id is expected by Packet but only present in Link
T8b949e// CBA TODO determine if Link needs to inherit from Destination or vice-versa
T8b949e//Bytes _link_id;

T8b949e//Type::Link::status _status;

T8b949e//double _last_outbound = 0.0;
T8b949e//uint16_t _tx = 0;
T8b949e//uint32_t _txbytes = 0;

Te6edf3friend Te6edf3class Te6edf3DestinationTb4b4b4;
Tb4b4b4}Tb4b4b4;
Te6edf3stdTff7b72:Tff7b72:Te6edf3shared_ptrTff7b72<Te6edf3ObjectTff7b72> Te6edf3_objectTb4b4b4;

Tb4b4b4}Tb4b4b4;

Tb4b4b4}

Served by rngit 1.4.2 - Generated in 0.04s